/* TicketLine.h
 * Author: mtreece
 * Date Started: 02/09/2010
 * Purpose:
 *  Header file for TicketLine.cpp
 */

#ifndef TICKETLINE_H
#define TICKETLINE_H

#include <stdio.h>

#include "MoneyWorth.h"
#include "IntArraySort.h"   /* My attempt at code reusability */
#include "Definitions.h"    /* For Definitions object */

/* Since I'm cross-referencing TicketLine and Definitions,
 * this declaration is necessary to make it all "click", so
 * to speak.
 * Reference: http://www.daniweb.com/forums/thread97195.html
 */
class Definitions;

class TicketLine{
	private:
		int line[5];
		int pb;

		static Definitions *definitions;
		/* Handy method for
		 * ensuring that int
		 * parameter is not yet
		 * used in the ticket 
		 * lineup.
		 */
		int isNew(int);

		/* Place to hold a 
		 * representation of our
		 * string...
		 * TODO: Refactor string
		 *       length.
		 */
		char string[30];

		/* Cool way to allow Definitions
		 * class to check out the core
		 * of this TicketLine object.
		 */
		friend class Definitions;

	public:
		/* Random ticket... */
		TicketLine(void);

		/* Specify ticket nums... */
		TicketLine(int,int,int,int,int,int);

		/* Return a string of this ticketline */
		char* toString();

		static void setDefinitions(Definitions*);

		/* Given a winner ticket, what is
		 * the value of this ticket?
		 */
		MoneyWorth* getWorth(TicketLine*);

};

#endif
